package com.opentae.data.mall.interfaces;

import com.opentae.core.mybatis.config.MyBatisRepository;
import com.opentae.core.mybatis.mapper.Mapper;
import com.opentae.data.mall.beans.CashApply;
import com.opentae.data.mall.pojo.CashDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;

import java.util.Date;
import java.util.List;

/**
 * 
 * Created by exampleCreater.
 */
@MyBatisRepository("tae_mall_cashApplyMapper")
@Scope("singleton")
@Lazy(true)
public interface CashApplyMapper extends Mapper<CashApply> {

    List<CashDto> cashList(@Param("startIndex")Integer startIndex,@Param("offset")Integer offset,@Param("mallUserId")String mallUserId,
                           @Param("status")Integer status);
    int countCash(@Param("mallUserId")String mallUserId, @Param("status")Integer status);

    //
    List<CashApply> autoCashList(@Param("ids")List<Long> ids, @Param("start")Date start,@Param("end")Date end);

    Double userMoneyCash(@Param("userId")Long userId, @Param("start")Date start, @Param("end")Date end);

    //提现的金额
    Double beCashedMoney(@Param("start")Date start, @Param("end")Date end);

    //所有待审核的提现
    Double freezeMoney();
}
